/*******************************************************************************
 * Package: com.ruoyi.system
 * Type:    RemoteSeataService
 * Date:    2024-03-04 9:10
 *
 * Copyright (c) 2024 LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.ShopProduct;
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 功能描述：
 *
 * @author Songxianyang
 * @date 2024-03-04 9:10
 */
@FeignClient(contextId = "remoteProductService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteProductService {
    @PostMapping("/product/add")
    AjaxResult add(@Validated @RequestBody ShopProduct shopProduct, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
